<?php
class Admin_Models_SuggestionModel extends Zend_Db_Table_Abstract{
	protected $_name="suggestion";
	protected $_primary="id";
	
	function getSuggestionList(){
		$db = Zend_Db_Table::getDefaultAdapter();
		$mySql = $db->select()
					->from(array("b"	=> $this->_name))
					->join(array("p"	=> "product"), "b.product_id = p.id",array('poster',"developer","product"	=> "name",'icon'))
					->join(array("c"	=> "category"), "p.category_id = c.id",array('product_type'	=> "type"));
		$result = $db->fetchAll($mySql);
		return $result;
	}
}